<?php 

$title = "Galleries";

include("header.php");
include("banners/main-left-banner.php");
?>

</td><td>

<table class="list-table">
<tr><td colspan="3"><h2>All Galleries</h2></td></tr>

<tr>
	<th>Added</th>
	<th>Name</th>
	<th>Description</th>
</tr>

<?php 

$query="SELECT * FROM gallery order by added desc";
$result=mysql_query($query);

$num=mysql_numrows($result);

$i=0;
while ($i < $num) {
	
	$id=mysql_result($result,$i,"id");
	$name=mysql_result($result,$i,"name");
	$desc=mysql_result($result,$i,"desc");
	$added=mysql_result($result,$i,"added");
	
	
	if ($i%2 == 0) {
		echo '<tr class="list-tr">';
	}
	else {
		echo '<tr class="list-tr-alter">';
	}
	
	
	
	echo '<td>'.$added.'</a></td>';
	echo '<td><a href="show-'.$id.'">'.$name.'</a></td>';
	echo '<td><a href="show-'.$id.'">'.$desc.'</a></td>';
	
	echo '</tr>';
	
	$i++;
}

?>

</table>
</td><td valign="top" width="125px">

<?php 

include("banners/main-right-banner.php");
include("footer.php");

?>